package com.java.comprehensive.design.behavioral_model.chain_of_responsibility_pattern;

public class Client {
    public static void main(String[] args) {
        LeaveRequest xm = new LeaveRequest("小明", 1, "身体不适");
        LeaveRequest tom = new LeaveRequest("Tom", 2, "回家");

        GroupLeader groupLeader = new GroupLeader();
        Manager manager = new Manager();
        GeneralManager generalManager = new GeneralManager();

        groupLeader.setNextHandler(manager);
        manager.setNextHandler(generalManager);

        //提交请假  这样成流程审批的 调用  责任链模式
        groupLeader.submit(xm);

        groupLeader.submit(tom);
    }
}
